package com.easywan.web.controller;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.easywan.service.TestService;
@Controller
public class TestController{
	private static Logger loger = Logger.getLogger(TestController.class);
	//org.springframework.transaction.support.ResourceTransactionManager s;
	@Autowired
	private TestService testService;
	@RequestMapping("test.html")
	public ModelAndView test(ModelMap modelMap){
		loger.info("这是ControllerLog");
		System.out.println("123");
		
		modelMap.addAttribute("data", testService.selectAll());
		
		return new ModelAndView("test.jsp",modelMap);
	}
}
